<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.math.ErrorFunction</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.math.ErrorFunction";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.math.ErrorFunction.html" class="symbol">tango.math.ErrorFunction</a></h1>
  
<div class="summary">Error Functions and Normal Distribution.</div>
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Authors:</p>Stephen L. Moshier, ported to D by Don Clugston
<dl>
<dt class="decl">real <a class="symbol _function" name="erfc" href="./htmlsrc/tango.math.ErrorFunction.html#L100" kind="function" beg="100" end="143">erfc</a><span class="params">(real <em>a</em>)</span>; <a title="Permalink to this symbol" href="#erfc" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.math.ErrorFunction.html#L100">#</a></dt>
<dd class="ddef">
<div class="summary">Complementary error function</div>
erfc(x) = 1 - erf(x), and has high relative accuracy for
 values of x far from zero. (For values near zero, use erf(x)).
<p class="bl"/>
  1 - erf(x) =  2/ √(&pi;)
     &#8747; exp( - t<sup>2</sup>) dt
<p class="bl"/>

 For small x, erfc(x) = 1 - erf(x); otherwise rational
 approximations are computed.
<p class="bl"/>
 A special function expx2(x) is used to suppress error amplification
 in computing exp(-x^2).</dd>
<dt class="decl">real <a class="symbol _function" name="erf" href="./htmlsrc/tango.math.ErrorFunction.html#L186" kind="function" beg="186" end="199">erf</a><span class="params">(real <em>x</em>)</span>; <a title="Permalink to this symbol" href="#erf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.math.ErrorFunction.html#L186">#</a></dt>
<dd class="ddef">
<div class="summary">Error function</div>
The integral is
<p class="bl"/>
  erf(x) =  2/ √(&pi;)
     &#8747; exp( - t<sup>2</sup>) dt
<p class="bl"/>
 The magnitude of x is limited to about 106.56 for IEEE 80-bit
 arithmetic; 1 or -1 is returned outside this range.
<p class="bl"/>
 For 0 &lt;= |x| &lt; 1, a rational polynomials are used; otherwise
 erf(x) = 1 - erfc(x).
<p class="sec_header">ACCURACY:</p>Relative error:
 arithmetic   domain     # trials      peak         rms
    IEEE      0,1         50000       2.0e-19     5.7e-20</dd></dl>
</div>
<div id="footer">
  <p>Copyright (C) 1984, 1995, 2000 Stephen L. Moshier
   Code taken from the Cephes Math Library Release 2.3:  January, 1995</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:14 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>